/*
 *  Copyright 2019-2020 Zheng Jie
 *
 *  Licensed under the Apache License, Version 2.0 (the "License");
 *  you may not use this file except in compliance with the License.
 *  You may obtain a copy of the License at
 *
 *  http://www.apache.org/licenses/LICENSE-2.0
 *
 *  Unless required by applicable law or agreed to in writing, software
 *  distributed under the License is distributed on an "AS IS" BASIS,
 *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 *  See the License for the specific language governing permissions and
 *  limitations under the License.
 */
package com.fzhucc.modules.sendDataToQz.controller;

import com.fzhucc.annotation.Log;
import com.fzhucc.annotation.rest.AnonymousGetMapping;
import com.fzhucc.modules.sendDataToQz.service.SendToQzService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import lombok.RequiredArgsConstructor;
import org.springframework.http.HttpStatus;
import org.springframework.http.ResponseEntity;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;

/**
 * @author yyg
 * @date 2024-05-07
 */
@RestController
@RequiredArgsConstructor
@Api(tags = "真实发送数据至全总")
@RequestMapping("/api/sendToQzReal")
public class SendDataToQzRealController {

    private final SendToQzService sendToQzService;

    @ApiOperation("发送项目数据至全总 劳模新增审核通过的")
    @Log("发送项目数据至全总 劳模新增审核通过的")
    @AnonymousGetMapping(value = "/sendModel")
    public ResponseEntity<Object> sendModel() throws Exception {
        sendToQzService.rMAll();
        return new ResponseEntity<>(HttpStatus.OK);
    }

    @ApiOperation("发送项目数据至全总 企业需求审核通过的")
    @Log("发送项目数据至全总 企业需求审核通过的")
    @AnonymousGetMapping(value = "/sendXq")
    public ResponseEntity<Object> sendXq() throws Exception {
        sendToQzService.rXqAll();
        return new ResponseEntity<>(HttpStatus.OK);
    }

    @ApiOperation("发送项目数据至全总 技术服务队审核通过的")
    @Log("发送项目数据至全总 技术服务队审核通过的")
    @AnonymousGetMapping(value = "/sendJs")
    public ResponseEntity<Object> sendJs() throws Exception {
        sendToQzService.rTsAll();
        return new ResponseEntity<>(HttpStatus.OK);
    }

    @ApiOperation("发送项目数据至全总 需求中的企业信息审核通过的")
    @Log("发送项目数据至全总 需求中的企业信息审核通过的")
    @AnonymousGetMapping(value = "/sendXqQy")
    public ResponseEntity<Object> sendXqQy() throws Exception {
        sendToQzService.rXqQyAll();
        return new ResponseEntity<>(HttpStatus.OK);
    }

    @ApiOperation("发送项目数据至全总 劳模中的企业信息审核通过的")
    @Log("发送项目数据至全总 劳模中的企业信息审核通过的")
    @AnonymousGetMapping(value = "/sendModelQy")
    public ResponseEntity<Object> sendModelQy() throws Exception {
        sendToQzService.rMQyAll();
        return new ResponseEntity<>(HttpStatus.OK);
    }


}